package com.alien.admin.modules.deploy.rest;

import com.alien.admin.annotation.Log;
import com.alien.admin.modules.deploy.domain.DeployStatisticParam;
import com.alien.admin.modules.deploy.service.DeployStatisticService;
import com.alien.admin.modules.deploy.service.DpDeployTplService;
import com.alien.admin.modules.deploy.service.dto.DpDeployTplQueryCriteria;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Copyright (C), 2014-2021, 厦门神州鹰软件科技有限公司
 * FileName: DeployStatisticController
 *
 * @author: zengzf
 * Date:     2021/11/12 11:11
 * Description:
 * History:
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "部署统计")
@RequestMapping("/api/deployStatistic")
public class DeployStatisticController {

    private final DeployStatisticService deployStatisticService;

    @GetMapping(value = "query")
    @Log("部署情况统计")
    @ApiOperation("部署情况统计")
    public ResponseEntity<Object> query(DeployStatisticParam deployStatisticParam) {
        return new ResponseEntity<>(deployStatisticService.getStatisticInfo(deployStatisticParam), HttpStatus.OK);
    }
}

